package com.wmm.fast.main.shop2simplefactory;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 写写画画 收银业务
 * @Auther: Token360
 * @Date: 2018/9/5 14:41
 * @Description:
 */
public class ShopCashiersReturn implements ShopCashiersInterface {

    private static Logger log = LoggerFactory.getLogger(ShopCashiersReturn.class);

    private double condotion = 100d;
    private double result = 10d;

    public ShopCashiersReturn() {}
    public ShopCashiersReturn(double condition,double result) {
        this.condotion = condition;
        this.result = result;
    }

    @Override
    public double acceptCash(double payMoney) {
        log.info("满赠收银:[{}],赠[{}]",payMoney,payMoney >= condotion ? result : 0);
        return payMoney;
    }

}
